package com.companyName.sample.common.constant;

public class CommConstants {

	public static class ReqParamName {
		// this is the parameter decoded from id_token (not from client)
		public static final String Pid = "_pid";

		public static final String Id = "id";
		public static final String UserId = "user_id";
		public static final String MediaId = "media_id";
		public static final String MediaType = "media_type";
		public static final String UrlId = "url_id";
		public static final String Timestamp = "timestamp";
		public static final String Length = "length";
		public static final String Title = "title";
		public static final String Description = "description";
		public static final String Tags = "tags";
		public static final String AccessLevel = "access_level";
		public static final String QueryType = "query_type";
		public static final String PageId = "page_id";
		public static final String PageSize = "page_size";
		public static final String Comment = "comment";
		public static final String Method = "method";
		public static final String LoginType = "login_type";
		public static final String Code = "code";
		public static final String ReceiverId = "rcv_id";
		public static final String TagId = "tag_id";
		public static final String ReceiverType = "rcv_type";
		public static final String StartTime = "start_time";
		public static final String CommentId = "comment_id";
		public static final String Name = "name";
		public static final String Avatar = "avatar";
		public static final String Signature = "sign";
		public static final String FileType = "file_type";
		public static final String WriterType = "writer_type";
		public static final String FileSize = "file_size";
		public static final String FileId = "file_id";
		public static final String MediaUrl = "media_url";
		public static final String ThumbnailUrl = "thumbnail_url";
		public static final String Status = "status";
		public static final String Token = "token";
	}


	public class UserType {
		public static final int XiaoMi = 1;
		public static final int WeiXin = 2;
		public static final int Facebook = 9;
	}

	public static class MediaType {
		public static final int Video   = 1;
		public static final int Picture = 2;
		public static final int All     = Video | Picture;

		public static boolean has(int types, int type) {
			return (types & type) == type;
		}
	}

	public class PolicyKey {
		public static final String Region = "region";
		public static final String ServerHost = "server_host";
		public static final String ExpireInMinute = "expire_in_minute";
		public static final String GlobalUserServer = "global_data_server";
		public static final String AllowedLoginTypes = "allowed_login_types";
		public static final String XiaoMiClientId = "xiaomi_client_id";
		public static final String MailHost = "mail_host";
		public static final String MailPort = "mail_port";
		public static final String MailUser = "mail_user";
		public static final String MailPass = "mail_pass";
	}

	public class MailSecurity {
		public static final String PassCode = "tobeOrnottobe";
	}

	public class JsonWebToken {
		public static final String RegionKey = "rgn";
	}

	public class GlobalDataService {
		public static final String UserInfoPath = "/user/info";
	}

	public class InternalPassportService {
		public static final String UserInfoPath = "/server/info";
		public static final String UserRegionPath = "/server/region";
		public static final String UserRegisterPath = "/server/register";
		public static final String UserPasswordPath = "/server/password";
		public static final String JsonWebKeyPath = "/server/jwk";
		public static final String ResetUserPasswordPath = "/server/password_reset";
		public static final String ResendActivateCodePath = "/server/activate_code";
	}

	public class PassportService {
		public static final String ActivateRegisterPath = "/user/activate";
	}

	public class RequestParamNames {
		public static final String UniqueId = "unique_id";
		public static final String UserId = "user_id";
		public static final String UserType = "type";
		public static final String RegionCode = "region_code";
		public static final String Email = "email";
		public static final String Mobile = "mobile";
		public static final String Signature = "signature";
		public static final String Nonce = "nonce";
		public static final String AppId = "app_id";
		public static final String CreatedTime = "created_time";
		public static final String UpdatedTime = "updated_time";
		public static final String Successful = "successful";
		public static final String Code = "code";
		public static final String Result = "result";
		public static final String Message = "message";
		public static final String UserName = "name";
		public static final String Image = "img";
		public static final String DeviceId = "device_id";
		public static final String Seq = "seq";
		public static final String Token = "token";
		public static final String Key = "key";
		public static final String Value = "value";
		public static final String Region = "region";
		public static final String UserAccount = "user_account";
		public static final String Password = "password";
		public static final String OldPassword = "old_password";
		public static final String NewPassword = "new_password";
		public static final String KeyId = "key_id";
		public static final String UserInfo = "user_info";
		public static final String EventType = "event_type";
		public static final String Nation = "nation";
		public static final String Language = "language";
		public static final String ThirdPartyToken = "third_party_token";
		public static final String ActivityStatus = "activity_status";
		public static final String Captcha = "captcha";
		public static final String CaptchaId = "captcha_id";
		public static final String RefreshToken = "refresh_token";
	}

	public class LocalizedStringId {
		public static final String MailActivateTitle = "ID_MAIL_ACTIVATION_TITLE";
		public static final String MailActivateBody = "ID_MAIL_ACTIVATION_BODY";
		public static final String MailResetTitle = "ID_MAIL_RESET_TITLE";
		public static final String MailResetBody = "ID_MAIL_RESET_BODY";
	}

	public class LanguageCode {
		public static final String ZhCN = "zh_cn";
		public static final String ZhTW = "zh_tw";
		public static final String ZhHK = "zh_hk";
		public static final String EnUS = "en_us";
		public static final String KoKR = "ko_kr";
	}

	public class CallbackEventType {
		public static final String ChangePassword = "renew_credential";
	}


	/**
	 * 小米登录用户信息
	 */
	public static class XiaoMiUserInfoKey {
		public static final String Id = "userId";
		public static final String Name = "miliaoNick";
		public static final String Icon = "miliaoIcon_320";
		public static final String Sex = "sex";
	}
}
